package com.example.demo.com.example.factory.companyFactory;

import com.example.demo.com.example.factory.BJCCompany;
import com.example.demo.com.example.factory.ICompany;
import com.example.demo.com.example.factory.ZZMYCompany;

public class CompanyFactory {

    public ICompany getCompany(String compayName){
        if("zzmy".equals(compayName)){
            return new ZZMYCompany();
        }else if("bjc".equals(compayName)){
            return new BJCCompany();
        }else{
            return null;
        }
    }
}
